#!/usr/bin/env python

#   描述: 允许使用动态重配置实时调整PID参数和前馈增益等
PACKAGE = "diffbot_base"

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()

#        Name            Type      Level  Description                           Default   Min    Max
gen.add( "f" ,           double_t, 1,     "Feed forward gain.",                 10.0,     -100,  100)
gen.add( "p" ,           double_t, 1,     "Proportional gain.",                 10.0,     -100,  100)
gen.add( "i" ,           double_t, 1,     "Integral gain.",                     0.1,      -100,  100)
gen.add( "d" ,           double_t, 1,     "Derivative gain.",                   1.0,      -100,  100)
gen.add( "i_clamp_min" , double_t, 1,     "Min bounds for the integral windup", -10.0,    -100,    0)
gen.add( "i_clamp_max" , double_t, 1,     "Max bounds for the integral windup", 10.0,     0,     100)
gen.add( "antiwindup" ,  bool_t,   1,     "Antiwindup.",                        False)

gen.add( "gain",         double_t, 1, "Gain parameter of the gain trim model",  1.0,      0.0,   1.0)
gen.add( "trim",         double_t, 1, "Trim parameter of the gain trim model",  0.0,      0.0,   1.0)
                 # PkgName  #NodeName         #Prefix for generated .h include file, e.g. ParametersConfig.py
exit(gen.generate(PACKAGE, "diffbot_base", "Parameters"))
